package com.xiaoluo.a14_banner;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.xiaoluo.a14_banner.banner.BannerView;
import com.xiaoluo.a14_banner.banner.UiUtil;
import com.xiaoluo.a14_banner.banner.indicator.RectangleIndicator;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {
    private BannerView mBannerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        UiUtil.init(getApplicationContext());
        mBannerView = findViewById(R.id.banner_view);
        mBannerView.setIndicator(new RectangleIndicator(this));
        List<Integer> bannerData = new ArrayList<>();
        bannerData.add(R.drawable.a);
        bannerData.add(R.drawable.b);
        bannerData.add(R.drawable.c);
        bannerData.add(R.drawable.d);
        mBannerView.setBannerData(bannerData);
    }
}
